// 通用接口
export interface PlatformStrategy {
  // 绑定
  exchangeToken(code: string): Promise<{ access_token: string; expires_in: number }>;
  // 解绑
  revokeToken(access_token: string): Promise<void>;
  // 刷新token
  refreshToken(userId: string, oldToken: string): Promise<{ access_token: string; expires_in: number }>;
  // 获取设备列表信息
  getDeviceList(accessToken: string): Promise<{
    did: string;
    name: string;
    type: string;
    online: boolean;
  }[]>;
  // 订阅设备消息
  subscribeDevice(accessToken: string, deviceId: string): Promise<void>;
  // 取消订阅
  revokeDeviceSubscription(userId: string, did: string):Promise<void>;
  // 手动控制设备
  controlDevice(did:string, operation: string, value:any, accessToken: string): Promise<{ status: { result: 1 | 0; isSameState: 0 | 1 } }>;

}
